#!/bin/bash

add_external_repo "sublimehq" "https://download.sublimetext.com/sublimehq-pub.gpg" "https://download.sublimetext.com/" "apt/stable/" || exit 1

apt_update
if [ $? != 0 ]; then
  rm_external_repo "sublimehq"
  error "Failed to perform apt update after adding sublimehq repository."
fi

install_packages sublime-merge || exit 1
